package com.liu.servlet;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.nio.charset.StandardCharsets;

/**
 * @author LIU
 * @version 1.0
 * @description TODO
 * @date 2024/2/6 10:07
 */
@WebServlet(urlPatterns = "/liu")
public class LiuServlet extends HttpServlet {
    @Override
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
        System.out.println("get请求："+req);

        resp.getOutputStream().write("响应200".getBytes(StandardCharsets.UTF_8));
    }
}
